<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查询条件</title>
<style type="text/css">
.head {
	/* for IE */
	filter: alpha(opacity = 50);
	/* CSS 3 standard */
	opacity: 0.5;
}

.error {
	background-color: orangered;
}

.seperator {
	border-left: 2px solid darkorange;
}

.detail_info {
	position: absolute;
	display: none;
}

#auto_div {
	display: none;
	/*width: 100px;*/
	border: 1px #74c0f9 solid;
	background: #FFF;
	position: absolute;
	/*top: 24px;*/
	/*left: 0;*/
	color: #323232;
}
</style>
<link type="text/css" rel="stylesheet" media="all"
	href="<%=path %>/css/resultTable.css" />
<script type="text/javascript" src="<%=path%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=path%>/js/util.js?ver=1.09"></script>
<script type="text/javascript" src="<%=path%>/js/json2.js?ver=1.00"></script>
<script type="text/javascript" src="<%=path%>/js/inputEdit.js?ver=1.00"></script>
<script type="text/javascript"
	src="<%=path%>/js/condition-builder.js?ver=1.127"></script>
<script type="text/javascript">
			window.onload = function () {
				var lastJson = $('#lasQueryValueInput').val();
				var a = $('#dataJsonValueInput').val();
				dataJson = eval('(' + a + ')');
				getQueryRoot(lastJson);
				
			};
			
			function getReturnVal() {
				var temp = $('#input1').val();
				if (temp === '') {
					alert("该条件下数据库中没有数据！");
					return;
				}
				var tempJson = eval("(" + temp + ")");
				var datatype = tempJson.dataType;
				var values = tempJson.values;
				var lasSelect = tempJson.selecVal;
				var currentOpr = tempJson.currentOpr;
				var editabel = tempJson.editabel;
				getFrame(datatype, values, currentOpr, lasSelect, editabel);
			}
			function sendQuery(){
				var condition = getCondition('#queryBuider >table');
				if (condition === false) {
					return;
				}
				var querySql = getQuery(condition);
				var condistring = JSON.stringify(condition);
				setSql(querySql,condistring);
			};
			
	</script>
</head>
<body>
	<input type="hidden" id="lasQueryValueInput" />
	<input type="hidden" id="dataJsonValueInput"
		value='[{"alias":["user1","user2"],"colums":[{"propertyName":"id","type":"IntegerType","label":"编号"},{"propertyName":"name","type":"StringType","label":"姓名"}]}]' />
	<div id="mainDiv">
		<div id="queryBuider" class="query" align="center"></div>
		<input value="确定" type="button" onclick="sendQuery()" />
		<!-- 输入提示信息 -->
		<div id="auto_div"
			style="display: none; border: 1px #74c0f9 solid; background: #FFF; position: absolute; color: #323232; height: 100px; overflow: auto;"></div>
		<!--浮动的详细信息-->
		<div class="detail_info" id="box_detail"></div>
	</div>
	<div id="resultData">
		<table class="hovertable">
		</table>
	</div>
</html>